﻿
using SharpDepend.Datatypes;
using System;
namespace SharpDepend
{
    public delegate void MulticastListenerResult(byte[] data);

    public interface ISocketMulticast : IDisposable
    {
        BoolResult CreateMulticastSender(string ip, int port);

        BoolResult CreateMulticastListener(string ip, int port);

        void Write(byte[] data, int length);

        void Read(MulticastListenerResult result);
    }

    /// <summary>
    /// Multicast manager.
    /// <para>Example of ip: 239.0.0.222</para>
    /// <para>Example of port: 2222</para>
    /// </summary>
    public interface ISocketMulticastManager
    {
        ISocketMulticast CreateMulticast();
    }
}
